//package com.hjh.netty.elect.demo2;
//
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.handler.codec.string.StringDecoder;
//import io.netty.handler.codec.string.StringEncoder;
//import io.netty.util.CharsetUtil;
//
//public class ServerChannelInitializer extends ChannelInitializer<SocketChannel> {
//    @Override
//    protected void initChannel(SocketChannel socketChannel) {
//        //添加编解码（因项目中有十六进制传输，又有字符串传输，所以没有用编解码）
////        socketChannel.pipeline().addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));
////        socketChannel.pipeline().addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));
//        socketChannel.pipeline().addLast(new NettyServerHandler());
//    }
//}
